create or replace type category_obj as object (
  name varchar(60 char),

  constructor function category_obj (
    name varchar2
  ) return self as result
  
) instantiable not final;
/
create or replace type body category_obj as 

  constructor function category_obj (
    name varchar2
  ) return self as result
  is
  begin
    self.name := name;
    return;
  end;

end;
/
create or replace type reader_obj as object (
   fname varchar2(50 char),
   lname varchar2(50 char),
   zip_code varchar2(50 char),
   city varchar2(50 char),
   address varchar2(100 char),
   email varchar2(100 char),

  constructor function reader_obj (
    fname varchar2,
    lname varchar2,
    zip_code varchar2,
    city varchar2,
    address varchar2,
    email varchar2
  ) return self as result

) instantiable not final;
/
create or replace type body reader_obj as
  
  constructor function reader_obj (  
    fname varchar2,
    lname varchar2,
    zip_code varchar2,
    city varchar2,
    address varchar2,
    email varchar2
  ) return self as result
  is
  begin
    self.fname := fname;
    self.lname := lname;    
    self.zip_code := zip_code;
    self.city := city;
    self.address := address;
    self.email := email;
    return;
  end;

end;
/

create or replace type author_obj as object (
   fname varchar2(50 char),
   lname varchar2(50 char),

  constructor function author_obj (
    fname varchar2,
    lname varchar2
  ) return self as result

) instantiable not final;
/

create or replace type body author_obj as

  constructor function author_obj (
    fname varchar2,
    lname varchar2
  ) return self as result
  is
  begin
    self.fname := fname;
    self.lname := lname;
    return;
  end;

end;
/

